package com.example.oop;

public class Store {

 Dessert[] desserts;

 public Store() {
 desserts = new Dessert[4];
 }

 public Dessert getDessert(int index) {
     return desserts[index];
// ...
 }

 public void setDessert(Dessert dessert, int index) {
     desserts[index] = dessert;
// ...
 }

 }